<template>
	<view>
		<NavBar :text='textinfo'></NavBar>
		<view style="width: 100%; height: 123rpx;"></view>
		<view class="flx1" style="width: 90%; margin:0 auto;">
			<view class="name">{{yhinfo.name}}</view>
			<view class="sex">{{yhinfo.sex}}</view>
			<view class="age">{{yhinfo.age}}岁</view>
		</view>
		<view style="width: 100%; height: 20rpx; background-color: #f7f7f7;"></view>
		<view class="zstyle">
			<view style="width: 90%; margin:0 auto;">
				<view class="flx zstyle_border">
					<view class="zstyle_border_text">{{jgtext}}</view>
					<view class="flx1">
						<view class="zstyle_border_text_ u-line-1">{{blinfo.yy}}</view>
						<view class="flxAlign">
							<u-icon name="arrow-right" color="#cecece" size="20"></u-icon>
						</view>
					</view>
				</view>
				<view class="flx zstyle_border">
					<view class="zstyle_border_text">费别</view>
					<view class="flx1">
						<view class="zstyle_border_text_ u-line-1">{{blinfo.label}}</view>
						<view class="flxAlign">
							<u-icon name="arrow-right" color="#cecece" size="20"></u-icon>
						</view>
					</view>
				</view>
				<view class="flx zstyle_border">
					<view class="zstyle_border_text">{{hztext}}</view>
					<view class="flx1">
						<view class="zstyle_border_text_ u-line-1">{{blinfo.zyy}}</view>
						<view class="flxAlign">
							<u-icon name="arrow-right" color="#cecece" size="20"></u-icon>
						</view>
					</view>
				</view>
				<view class="flx zstyle_border">
					<view class="zstyle_border_text u-line-1">{{hzyuanyin}}</view>
					<view class="flx1">
						<view class="zstyle_border_text_ u-line-1">{{blinfo.message}}</view>
						<view class="flxAlign">
							<u-icon name="arrow-right" color="#cecece" size="20"></u-icon>
						</view>
					</view>
				</view>
				<view class="flx zstyle_border">
					<view class="zstyle_border_text">初步诊断</view>
					<view class="flx1">
						<view class="zstyle_border_text_ u-line-1">{{blinfo.zd}}</view>
						<view class="flxAlign">
							<u-icon name="arrow-right" color="#cecece" size="20"></u-icon>
						</view>
					</view>
				</view>
				<view class="flx zstyle_border">
					<view class="zstyle_border_text">病情描述</view>
					<view class="flx1">
						<view class="zstyle_border_text_ u-line-1">{{blinfo.info}}</view>
						<view class="flxAlign">
							<u-icon name="arrow-right" color="#cecece" size="20"></u-icon>
						</view>
					</view>
				</view>
				<view class="flx zstyle_border">
					<view class="zstyle_border_text" style="line-height: 50rpx;">是否同步上传电子报告</view>
					<view class="flx1">
						<u-radio-group v-model="radiovalue1" placement="row" @change="groupChange">
							<u-radio :customStyle="{marginBottom: '8px', marginLeft: '20px'}" v-for="(item, index) in radiolist1"
								:key="index" :label="item.name" :name="item.name" @change="radioChange">
							</u-radio>
						</u-radio-group>
					</view>
				</view>
				<view class="flx1 zstyle_border">
					<view class="zstyle_border_text">附件资料</view>
					<view class="flx1 flxAlign" style="margin-left: 20rpx;">
						<u-upload
							:fileList="fileList6"
							name="6"
							multiple
							:maxCount="1"
							width="250"
							height="150"
							accept='file'
						>
							<u-button size="mini">点击选择文件</u-button>
						</u-upload>
					</view>
				</view>
				<view class="flx1 zstyle_border" style="border-bottom: none;">
					<view class="zstyle_border_text">图片资料</view>
					<view class="flx1 flxAlign" style="margin-left:30rpx;">
						<u-upload
							:fileList="fileList6"
							name="6"
							multiple
							:maxCount="5"
							width="250"
							height="150"
							accept='file'
						>
						<view >
							<view style="width: 50rpx; height: 50rpx;">
								<image style="width: 100%; height: 100%;" src="/static/twowayReferral/chuangchuan.png"></image>
							</view>
						</view>
						</u-upload>
					</view>
				</view>
				<view style="font-size: 25rpx; color:#a5a5a5; margin-left: 25rpx;">(最多上传五张)</view>
			</view>
		</view>
		<view class="button" @click="ljjn">完成</view>
	</view>
</template>

<script>
	import NavBar from '@/components/NarBar.vue'
	export default {
		components: {
			NavBar
		},
		data() {
			return {
				jgtext:'转诊医疗机构',
				textinfo:'转诊申请',
				hztext:'转往医疗机构',
				hzyuanyin:'转诊原因',
				isxian:true,
				fileList6: [],
				yhinfo: {
					name: '张三三',
					sex: '女',
					age: '23',
					ks: '内科',
					bz: '斑疹伤寒',
					date: '2023-03-23 12: 22',
					status: 0,
				},
				blinfo: {
					yy: '太原市中心医院',
					label: '普通患者',
					zyy: '山西省第一医院',
					message: '转诊原因转诊原因转诊原因',
					zd: '斑疹伤寒',
					info: '病情描述病情描述病情描述'
				},
				radiolist1: [{
						name: '是',
						disabled: false
					},
					{
						name: '否',
						disabled: false
					}
				],
				radiovalue1: '是',
			}
		},
		onLoad(e){
			if(e.status){
				this.textinfo='转诊申请'
				let arrays = JSON.parse(e.datas)
				this.yhinfo.name = arrays.name
				this.yhinfo.sex = arrays.sex
				this.yhinfo.age = arrays.age
			}
			if(e.status == 0){
				this.jgtext = '申请机构'
			}else if(e.status == 1){
				this.jgtext = '上级机构'
				this.hztext = '回转机构'
				this.hzyuanyin = '回转原因'
			}
			
		},
		methods: {
			groupChange(n) {
			        console.log('groupChange', n);
			      },
			      radioChange(n) {
			        console.log('radioChange', n);
			      },
				  ljjn(){
					  uni.switchTab({
					  	url:'/pages/index/index'
					  })
				  }
		}
	}
</script>

<style lang="scss">
	.name {
		font-size: 30rpx;
		line-height: 80rpx;
		color: #333;
		font-weight: 600;
	}

	.sex {
		font-size: 30rpx;
		line-height: 80rpx;
		color: #a6a6a6;
		margin-left: 15rpx;
	}

	.age {
		font-size: 30rpx;
		line-height: 80rpx;
		color: #a6a6a6;
		margin-left: 15rpx;
	}

	.zstyle {
		width: 100%;
		background-color: #fff;

		.zstyle_border {
			border-bottom: 1rpx solid #f5f5f5;
			line-height: 100rpx;

			.zstyle_border_text {
				font-size: 30rpx;
				color: #333;
				width: 28%;
				text-align: end;
			}

			.zstyle_border_text_ {
				width: 100%;
				width: 330rpx;
				font-size: 30rpx;
				color: #a6a6a6;
				text-align: end;
			}
		}
	}
	.button{
		width: 85%;
		margin:0 auto;
		background-color: #ffcc33;
		line-height: 80rpx;
		color: #fff;
		text-align: center;
		letter-spacing: 1rpx;
		border-radius: 45rpx;
		font-size: 28rpx;
		margin-top:80rpx;
	}
</style>